package collections;

public class ContainerTest {
    public static void main(String[] args) {
        Container c = new Container();

        System.out.println( c.toString() );

        boolean x = c.add( 1000 );//auto-boxing : 1000----> Integer.valueOf(1000)
        System.out.println( x );

        x = c.add( "两万" );
        System.out.println( x );

        System.out.println( c.size() );//元素个数
        System.out.println( c.isEmpty() );//判断容器是否为空

        System.out.println( c.toString() );

        c.add("王百万");
        c.add("杭州马");
        c.add("深圳马");

        System.out.println( c.toString() );

        c.add( "东理马" );

        System.out.println( c.toString() );

        c.clear();

        System.out.println( "size : " +  c.size() + " , isEmpty : " + c.isEmpty() );
        System.out.println( c.toString() );
    }



}
